#ifndef CutDown_H
#define CutDown_H

#include <QObject>
#include <QWidget>
#include <QPushButton>
#include <QHBoxLayout>
#include <QLabel>
#include <QDebug>
#include <QEvent>
#include "utils/xatom-helper.h"
#include <QGraphicsDropShadowEffect>
#include <kborderlessbutton.h>
class CutDown : public QWidget
{
    Q_OBJECT
public:
    explicit CutDown(QWidget *parent = nullptr, int cutdown = 0);

signals:

protected:
    bool eventFilter(QObject *obj, QEvent *event);

private slots:
    void slotCancelRec();
    void slotUpdateTimer();

Q_SIGNALS:
    void sigCancelRec();
    void sigStartRec(int);
    void setFontSizeSignal(int); //字体变化

private:
    void initLayout();
    void initConnect();
    void initFontSize();
    void initGsetting();
    void changeStyle();
    void lable2SetFontSizeSlot(int size);

    void setBtnSize();
    void setBtnIconSize();
    void setBtnIcon();
    void setTooltips();

    int m_cutdown;
    QString nowThemeStyle;
    QLabel * m_TimeRec;      // 倒计时
    QLabel * m_line1 ;
    kdk::KBorderlessButton *m_btnCancelRec;  // 取消
    QTimer *m_timer;
    QString widRadius = QString("12px");
    QFrame *g_tooleWid = nullptr;                               //布局
};

#endif // CutDown_H
